Pyrazoloazepinones and methods of using such pyrazoloazepinones to dye synthetic fibers and to pigment pastes, paints, printing inks, colored paper and colored macromolecular substances

ABSTRACT

Heterocyclic compounds of the formula ##STR1## in which R represents hydrogen, substituted or unsubstituted alkyl, substituted or unsubstituted cycloalkyl, substituted or unsubstituted aryl, substituted or unsubstituted hetaryl, 
     A represents C--R 1 , N, 
     R 1  represents substituted or unsubstituted alkyl, substituted or unsubstituted cycloalkyl, substituted or unsubstituted aryl, substituted or unsubstituted hetaryl, 
     X, Y represent O, NH, 
     Z represents hydrogen, --CN, substituted or unsubstituted aryl, substituted or unsubstituted hetaryl, 
     W represents O, N--R 5 , 
     R 5  represents hydrogen, substituted or unsubstituted alkyl, substituted or unsubstituted cycloalkyl, substituted or unsubstituted aryl, a substituted or unsubstituted heterocyclic radical and 
     B represents a substituted or unsubstituted carbocyclic-aromatic or heterocyclic ring onto which one or more further rings can be fused, 
     and the use of these compounds as dyestuffs or pigments.

This application is a continuation of application Ser. No. 808,971, filed Dec. 16, 1991, now abandoned which is a continuation of Ser. No. 488,580 filed Mar. 5, 1990, now abandoned.

The invention relates to heterocyclic compounds of the formula (I) ##STR2## processes for their preparation and their use as dyestuffs or pigments, in particular for the dyeing or pigmenting of high-molecular weight organic material or as pigments for paints.

In formula (I),

R represents hydrogen, substitute or unsubstituted alkyl, substituted or unsubstituted cycloalkyl, substituted or unsubstituted aryl, substituted or unsubstituted hetaryl,

A represents C--R¹ or N,

R¹ represents substituted or unsubstituted alkyl, substituted or unsubstituted cycloalkyl, substituted or unsubstituted aryl, substituted or unsubstituted hetaryl,

X, Y represent O, NH,

Z represents hydrogen, --CN, substituted or unsubstituted aryl, substituted or unsubstituted hetaryl,

W represents O, N--R⁵,

R⁵ represents hydrogen, substituted or unsubstituted alkyl, substituted or unsubstituted cycloalkyl, substituted or unsubstituted aryl, a substituted or unsubstituted heterocyclic radical,

B represents a substituted or unsubstituted carbocyclic-aromatic or heterocyclic ring onto which one or more further rings can be fused.

Alkyl (R, R¹) preferably represents C₁ -C₆ -alkyl, particularly preferably C₁ -C₄ -alkyl. Examples are: methyl, ethyl, n- and i-propyl, n-, i- and t-butyl.

Cycloalkyl (R, R¹) preferably represents mono-, bi- and tricyclic C₃ -C₁₀ -cycloalkyl, particularly preferably cyclopropyl, cyclopentyl, cyclohexyl.

The alkyl and cycloalkyl radicals (R, R¹, W) can be substituted, for example, by Cl, Br, F, --CN, --OH, C₁ -C₆ -alkoxy, mono-C₁ -C₄ -alkylamino, di-C₁ -C₄ -alkylamino, phenyl or naphthyl, which can be substituted by Cl, Br, F, C₁ -C₆ -alkyl and C₁ -C₆ -alkoxy or radicals of a 5- or 6-membered ring system containing 1 or 2 heteroatoms from the series consisting of O, N, S, onto which a benzene ring can be fused.

Aryl (R, R¹, Z) preferably represents those carbocyclic-aromatic radicals which contain 1, 2, 3 or 4, in particular 1 or 2, rings, for example phenyl, diphenyl and naphthyl.

Hetaryl (R, R:, Z) preferably represents those heterocyclic-aromatic radicals which contain 1, 2, 3 or 4, in particular 1 or 2, five-, six- or seven-membered rings, at least one of which contains 1, 2 or 3, preferably 1 or 2, heteroatoms from the series consisting of O, N, S.

Examples of heterocyclic-aromatic radicals are: pyridyl, pyrimidyl, pyrazinyl, triazinyl, furanyl, pyrrolyl, thienyl, quinolyl, coumarinyl, benzofuranyl, benzimidazolyl, benzoxazolyl, dibenzofuranyl, benzothienyl, dibenzothienyl, indolyl, carbazolyl, pyrazolyl, imidazolyl, oxazolyl, isoxazolyl, thiazolyl, indazolyl, benzothiazolyl, pyridazinyl, cinnolyl, quinazolyl, quinoxalyl, phthalazinyl, phthalazinedionyl, phthalimidyl, chromonyl, naphtholactamyl, benzopyridonyl, ortho-sulphobenzimidyl, maleimidyl, naphtharidinyl, benzimidazolonyl, benzoxazolonyl, benzothiazolonyl, benzothiazolinyl, quinazolonyl, pyrimidonyl, quinoxalonyl, phthalazonyl, dioxapyrimidinyl, pyridonyl, isoquinolonyl, isoquinolinyl, isothiazolyl, benzoisoxazolyl, benzoisothiazolyl, indazolonyl, acridinyl, acridonyl, quinazolinedionyl, quinoxalinedionyl, benzoxazinedionyl, benzoxazinonyl and naphthalimidyl.

The aryl and hetaryl radicals (R, R¹, Z) can be substituted, for example, by halogen, such as chlorine, bromine, fluorine, CN, R², OR³, SR³, NR⁵, R⁶, COOR⁷, NR³ COR⁷, NR³ COOR⁷, NR³ CONR⁵ R⁶, --NHSO₂ R⁷, --SO₂ R⁷, SOR⁷, SO₂ OR⁷, CONR⁵ R⁶, SO₂ NR⁵ R⁶, --N═N--R¹⁰, OCOR⁷ and OCONHR⁷.

R² represents substituted or unsubstituted alkyl, in particular C₁ -C₆ -alkyl, particularly preferably C₁ -C₄ -alkyl. Examples of substituents are: Cl, Br, F, --CN, --OCOR⁷, --OR³, --COOR⁷, --SR³, --CONR⁵ R⁶, --OCONHR⁷.

R⁵ and R⁶ represent hydrogen, substituted or unsubstituted alkyl, in particular C₁ -C₁₈ -alkyl, preferably C₁ -C₄ -alkyl, substituted or unsubstituted cycloalkyl, in particular cyclopentyl and cyclohexyl, substituted or unsubstituted aryl, in particular phenyl, naphthyl and diphenylyl, and a substituted or unsubstituted heterocyclic radical, in particular the radical of a 5- or 6-membered heterocyclic ring containing 1, 2 or 3 heteroatoms from the series consisting of 0, N, S, onto which a benzene ring can be fused.

The alkyl and cycloalkyl radicals R⁵ and R⁶ can be substituted, for example, by Cl, Br, F, --CN, --OH, mono-C₁ -C₄ -alkylamino, di-C₁ -C₄ -alkylamino, phenyl or naphthyl, which can be substituted by Cl, Br, F, C₁ -C₆ -alkyl and C₁ -C₆ -alkoxy or heterocyclic radicals of a 5- or 6-membered heterocyclic ring system which contains 1 or 2 heteroatoms from the series consisting of O, N, S, onto which a benzene ring can be fused.

It is also possible for R⁵ and R⁶ in the group --CONR⁵ R⁶ to form a 5- or 6-membered heterocyclic ring together with the N atom, for example a morpholine or piperidine ring.

The aryl and aralkyl radicals R⁵ and R⁶ can be substituted, for example, by Cl, Br, F, C₁ -C₁₈ -alkyl, preferably C₁ -C₄ -alkyl, C₁ -C₁₈ -alkoxy, preferably C₁ -C₄ -alkoxy.

R⁷ represents hydrogen, substituted or unsubstituted alkyl, preferably C₁ -C₄ -alkyl, substituted or unsubstituted cycloalkyl, in particular cyclopentyl and cyclohexyl, substituted or unsubstituted aralkyl, in particular phenyl- and naphthyl-C₁ -C₄ -alkyl, preferably benzyl, substituted or unsubstituted aryl, in particular phenyl and naphthyl, and a substituted or unsubstituted heterocyclic radical, in particular the radical of a 5- or 6-membered ring containing 1, 2 or 3 heteroatoms from the series consisting of O, N, S, onto which a benzene ring can be fused.

The radicals mentioned for R⁷ can be substituted, for example, in the same way as the corresponding radicals R⁵ and R⁶.

R³ represents hydrogen or adopts the meanings of R⁵.

R¹⁰ represents the radical of a coupling component, preferably a coupling component from the benzene, naphthalene, pyrazole or pyridone series or a phenyl radical which is unsubstituted or substituted by Cl, Br, F, C₁ -C₄ -alkyl or C₁ -C₄ -alkoxy.

The ring B in formula (I) can be an aromatic or heteroaromatic ring of the type mentioned for aryl (R, R¹, Z) or hetaryl (R, R¹, Z) which can carry, in addition to the two substituents at the bridging points ##STR3## the substituents mentioned above for substituted aryl and hetaryl.

Furthermore, B can also represent a non-aromatic heterocyclic radical which contains 1, 2, 3 or 4, in particular 1 or 2, five-, six- or seven-membered rings, at least one of which contains 1, 2, 3 or 4, preferably 1 or 2, heteroatoms from the series consisting of O, N, S. These heterocyclic radicals B can in turn be substituted by substituted or unsubstituted aryl or hetaryl which have the abovementioned meaning.

Particularly preferred rings B are substituted or unsubstituted aromatics having the abovementioned meaning and the substituted pyrazole, pyridine or pyrimidine derivatives (briding points indicated by W and C-Z) or their tautomeric forms shown below. ##STR4##

In formulae (II), (III) and (IV),

R¹¹ represents an aromatic or heteroaromatic radical of the abovementioned meaning having the abovementioned substitution (see R, R¹, Z),

R¹² represents --CN, --COOR⁷, --CONR⁵ R⁶ in which R⁵, R⁶ and R⁷ have the abovementioned meaning,

R¹³ represents halogen or OR³ in which R³ has the above-mentioned meaning.

The substituents R⁵ and R⁶ in formula (IV) also have the abovementioned meaning.

Preferred compounds according to the invention are those of the formula (I) in which W is N--R⁵ in which R⁵ has the abovementioned meaning, X, Y are O, Z is H, --CN, substituted or unsubstituted aryl, A is N, C-alkyl, which can be substituted, C-aryl, which can be substituted, and B is a substituted aromatic ring, substituted pyrazole, pyrimidine or pyridine ring.

Compounds which in one of their tautomeric forms correspond to the formulae Va-Vd are particularly preferred. ##STR5##

In these formulae the radicals R, A, R⁵, R⁶, R¹³, R¹¹, R¹² and Z have the abovementioned meanings;

Particularly preferably,

R represents phenyl, which can be substituted by 1 or 2 substituents from the series consisting of --SO₃ H, halogen (Cl, Br), --CN, C₁ -C₄ -alkyl, --SO₂ NH₂.

Apart from N, A particularly preferably represents ##STR6## R¹⁴, R¹⁵ represent hydrogen, halogen, OR³ or NR⁵ R⁶ in which R³, R⁵ and R⁶ have the meanings mentioned.

The compounds of the formula I in which Z is H are obtained by reacting either aldehydes of the formula ##STR7## (or their functional derivatives, for example their Schiff's bases) in which B and W have the abovementioned meanings with compounds of the formula ##STR8## in which R, R⁷ and A have the abovementioned meanings or by reacting formylated derivatives (which may be protected in the form of an anil) of (VII), that is compounds of the type ##STR9## with acidic C-H heterocycles of the type ##STR10## (IX) can be present in various tautomeric forms.

In the formulae (VIII) and (IX), U denotes OR³ or NHR⁵, R³, R⁵, R⁷ and R' have the above-mentioned meanings.

W and B also have the abovementioned meanings, B preferably representing heterocyclic rings.

The C-H acidity of the CH₂ group in formula (IX), as a result of suitable substitution in the ring B, must be such that it can react with the aldehyde group (or its equivalent) in (VIII).

The reactions mentioned can go through intermediates which rearrange with proton migration(s) to give a tautomeric form of the formula (I).

The reaction is advantageously carried out under the known conditions of the Knoevenagel condensation, that is, in a suitable solvent in the presence of an acid or basic catalyst. Suitable solvents are alcohols, glycols, aromatic hydrocarbons and aliphatic carboxylic acids and their amides.

Suitable acid catalysts are carboxylic acids, sulphonic acids and aminoacids, suitable basic catalysts are aliphatic amines. If the aldehyde (VI) or (VIII) used is the corresponding anil (Schiff's base), the addition of a catalyst can be omitted when the reaction is carried out in alcohols or carboxylic acids.

The reaction temperatures are between 20° and 150° C., preferably between 80° and 130° C.

The reaction to give (I) comprises two steps, namely condensation of an aldehyde (or aldehyde equivalent) with an active methylene group and intramolecular esterification or lactam formation (=reaction of the group --WH with the group CO₂ R⁷), which, however, are carried out in a one-pot reaction. Isolation of an intermediate or primary product is not required or even not feasible.

The preparation of compounds of the formula (I) in which Z is CN is carried out, for example, by reacting compounds of the formula (I) in which Z is H in a polar solvent such as dimethylformamide with cyanide salts and employing an oxidizing agent simultaneously or afterwards. This type of reactions is known in principle (cf. DE-A 2,844,299, U.S. Pat. Nos. 4,609,738, 4,634,779, 4,547,579, and 4,550,171.

Suitable cyanide salts are NaCN and KCN, suitable oxidizing agents are peroxides, persulphates, halogens, lead tetraacetate and nitric acid.

The reaction with the cyanides is carried out at 0°-120° C., preferably at 10°-40° C.

The oxidation is carried out at 0°-20° C.

Compounds of the formula (I) in which Z is aryl or hetaryl and W is NH are prepared by reacting β-aminoketones of the type ##STR11## in which Z is a substituted or unsubstituted aromatic or heteroaromatic and

R¹⁶ and R¹⁷ together represent the radicals of a fused-on substituted or unsubstituted aromatic or heteroaromatic

with an azolecarboxylic acid derivative of the type (VII).

The β-aminoketones of the formula (X) are known. See, for example, H. J. Scheifele Jr. Et al., Org. Synth. Coll., Vol. 4, p. 34-38 (1967); Simpson et al., J. Chem. Soc., p. 646 (1945); Bell et al., J. Chem. Soc., p. 3560 (1955); Beilstein, 4th Edition, p. 76 (1931); Beilstein, II. Erganzungswerk, p. 51 (1951); Beilstein, III. Erganzungswerk, p. 213, 214-216 (1973); Beilstein, IV. Erganzungswerk, p. 243, 245-247 (1985); J. Organometallic Chem., Vol. 215, No. 2, pp. 139-150 (1981); and Pharm. Weekbl., Sci. Ed., Vol. 4, No. 1, pp. 12-15 (1982).

Compounds of the formula (I) in which W is N-alkyl are prepared by reacting compounds of the type I in which W is NH in a dipolar aprotic solvent such as dimethylformamide in the presence of a non-nucleophilic base such as potassium carbonate or sodium carbonate with alkyl tosylates as N-alkylating agent. These reactions are also known in principle from the literature [e.g. H. Langhals, T. Potrawa, Chem. Ber. 120, 1075 (1987)].

The aldehydes (VI) in which WH is OH or NHz and which are used as starting material are known or easily accessible by conventional methods. Carbocyclic derivatives are described, for example, in DE-A-2,415,661, DE-A 1,098,125 U.S. Pat. No. 3,014,091 and U.S. Pat. No. 5,052,678 and DE-A 2,363,548.

Other aldehydes are easily accessible from halogenated nitrobenzaldehydes known from the literature. Heterocyclic representatives of (VI) are, for example, accessible from aminouracil derivatives by Vilsmeier formylation (K. Hirota et al., Synthesis 1984, 589).

A large number of azolecarboxylic acid derivatives of the type (VII) are also known and readily accessible. Pyrrole derivatives are described, for example, in EP-A 0,184,981 US. Pat. No. 4,681,971 and U.S. Pat. No. 4,769,795. Pyrazoles derivatives are accessible by the Japp-Klingemann reaction of diazotized amines with acetosuccinic esters in a wide range of substitution patterns (R. Heckendorn, Bull. Soc. Chim. Belg. 95 (1986), 921).

The components (VIII) are accessible from azole precursors (VII) by reaction with orthoesters [e.g. O. Wolfbeis, Mn. Chem. 112, 369 (1981)].

As components (IX), almost any desired heterocycle which contains the group WH defined above in more detail and an acidic C-H methylene group in a suitable position can be used.

The new substances of the formula (I) are dyestuffs or pigments and are suitable, depending on the substitution, either for the dyeing of synthetic fibres in yellow to violet hues or for their use as pigments in yellow to red hues for paints or plastics. Some dyestuffs have very good heat stability and can be used for the mass coloration of plastics.

The compounds of the formula (I) in which Z≠CN, W is NH and X, Y are 0 are yellow to red substances and are preferably used as pigments, but, depending on their structure and the type of the polymer to be dyed, they can also be used as polymer-soluble dyestuffs for, for example, polystyrene, polyamides, ABS, in particular for linear polyesters, in particular polyethylene terephthalates. The compounds of the formula (I) are obtained in a form which is suitable for pigment application or can be converted into such a suitable form by after-treatment processes known per se, for example by dissolving or swelling them in strong inorganic acids such as sulphuric acid and pouring them onto ice. They can be finely divided by milling them with or without milling auxiliaries such as inorganic salts or sand, if desired in the presence of solvents such as toluene, xylene, dichlorobenzene or N-methylpyrrolidone. Colour strength and transparency of the pigment can be affected by varying the after-treatment.

By virtue of their light and migration fastness, the compounds of the formula (I) are suitable for a wide range of pigment applications. Thus, they can be used for the preparation of systems of very high pigment fastness in a mixture with other substances, preparations, paints, printing inks, coloured paper and coloured macromolecular substances. A mixture with other substances can be understood to mean, for example, those with inorganic white pigments such as titanium dioxide (rutile) or with cement. Preparations are, for example, flush pastes containing organic liquids or pastes and fine pastes with water, dispersions and, if desired, preservatives. The name paints denotes, for example, physically or oxidatively drying lacquers, stoving enamels, reaction lacquers, two-component lacquers, disperse paints for weatherproof-coatings and distempers. Printing inks are meant to mean those for paper, textile and tinplate printing. The macromolecular substances can be of natural origin such as rubber, be obtained by chemical modification such as acetylcellulose, cellulose butyrate or viscose or produced synthetically such as polymers, polyaddition products and polycondensation products. Examples are plastic materials such as polyvinyl chloride, polyvinyl acetate, polyvinyl propionate, polyolefins, for example polyethylene or polyamides, superpolyamides, polymers and mixed polymers of acrylic esters, methacrylic esters, acrylonitrile, acrylamide, butadiene, styrene and polyurethanes and polycarbonates. The substances which are pigmented by means of the claimed products can be present in any desired form.

The compounds of the formula (I) in which Z is H, CN and W is O and N-alkyl are highly suitable for the dyeing of synthetic fibres of, for example, aromatic polyesters or cellulose triacetate which can be dyed in yellow to violet hues to give dyeings which have good general fastness properties.

EXAMPLES

In the examples which follow, parts are by weight.

EXAMPLE 1

9 parts of 1-(2,4-dichlorophenyl)-3-ethoxycarbonyl-5-pyrazolone and 11 parts of o-aminobenzaldehyde protected by means of p-toluidine are refluxed in 300 parts of glacial acetic acid for 5.5 hours. The mixture is filtered off with suction while hot, and the product is washed with glacial acetic acid and methanol until the filtrate remains colourless. This gives 14 parts of the compound. ##STR12##

The procedure of Example 1 is repeated, using appropriately substituted pyrazolone esters and aminobenzaldehyde equivalents to give the pigments and dyestuffs of the formula (XI) listed in the table below

    __________________________________________________________________________      ##STR13##                        (XI)                                                                          [nm]                                          Ex.                                                                               R.sup.18                                                                           R.sup.19                                                                          R.sup.20                                                                            R.sup.21                                                                           R.sup.22                                                                          R.sup.23                                                                           Yield                                                                              λ.sub.max                                                                  (DMF)                                         __________________________________________________________________________     1  Cl  H  Cl   H   Cl H   78  440                                              3  Cl  H  H    Cl  Cl H   51  464                                              4  H   H  Cl   H   Cl H   74  458                                              5  H   H  Br   H   H  H   84  447                                              6  H   H  Cl   H   H  H   89                                                   7  H   H  Br   H   Cl H   76                                                   8  Cl  H  H    Cl  H  H   72  436                                              9  H   CN CN   H   H  NMe.sub.2                                                                          80  484,                                                                              506                                           10 H   H  t-Butyl                                                                             H   H  NEt.sub.2                                                                          66  490                                              11 H   H  Cl   H   H  NMe.sub.2                                                                          60  486                                              12 H   H  SO.sub.2 NH.sub.2                                                                   H   H  H   91  442                                              __________________________________________________________________________

The procedure of Example 1 is repeated, using pyrrolone derivatives instead of pyrazolone derivatives, to give pyrroloazepinones (orange pigments) for which Example 13 is representative.

EXAMPLE 13 ##STR14##

Those representatives of the formula (I) which carry a six-membered heterocycle as ring B are represented by Example 14.

EXAMPLE 14 ##STR15##

If the reaction described in Example 1 is carried out in an aqueous-alcoholic solvent, it is also possible to use sulpho-containing pyrazolone derivatives, which leads to water-soluble dyestuffs, for which Example 15 is representative.

EXAMPLE 15

dyes wool and polyamide in a clear orange shade ##STR16##

EXAMPLE 16

17 parts of the compound ##STR17## are refluxed with 9 parts of the compound ##STR18## in 100 ml of glacial acetic acid for 18 hours. 11 parts of the compound ##STR19## are isolated.

EXAMPLE 17 (Working Example)

4 g of finely ground pigment according to Example 6 are dispersed in 92 g of a stoving enamel of the following composition:

33% of alkyd resin

15% of melamine resin

5% of glycol monomethyl ether

34% of xylene

13% of butanol

Suitable alkyd resins are products based on synthetic and vegetable fatty acids such as coconut oil, castor oil, castor oil, ricinene oil, linseed oil and the like. Instead of melamine resins, it is also possible to use urea resins.

After the pigmented lacquer has been dispersed, it is applied to paper, glass, plastic or metal sheets and stoved at 130° C. for 30 minutes. The coatings have very good light and weather fastness and good overcoating fastness.

EXAMPLE 18 (Working Example)

0.2 g of the pigment according to Example 6 are mixed with 100 g of polyethylene, polypropylene or polystyrene granules. The mixture can either be moulded directly at 220° to 280° C. in an injection moulding machine or processed in an extruder to give coloured rods or on mixing rolls to give coloured sheets. If necessary, the rods and sheets are granulated and moulded in an injection-moulding machine.

The orange mouldings have very good light and migration fastness. It is also possible to colour synthetic polyamides of caprolactam or adipic acid and hexamethylenediamine or the condensation products of terephthalic acid with ethylene glycol in a similar manner at 280°-300° C., if necessary under a nitrogen atmosphere. 

I claim:
 1. A heterocyclic compound of the formula: ##STR20## in which R represents hydrogen, unsubstituted or substituted alkyl, unsubstituted or substituted cycloalkyl, unsubstituted or substituted aryl, or unsubstituted or substituted hetaryl, hetaryl being selected from the group consisting of pyridyl, pyrimidyl, pyrazinyl, triazinyl, furanyl, pyrrolyl, thienyl, quinolyl, coumarinyl, benzofuranyl, benzimidazolyl, benzoxazolyl, dibenzofuranyl, benzothienyl, dibenzothienyl, indolyl, carbazolyl, pyrazolyl, imidazolyl, oxazolyl, isoxazolyl, thiazolyl, indazolyl, benzothiazolyl, pyridazinyl, cinnolyl, quinazolyl, quinoxalyl, phthalazinyl, phthalazinedionyl, phthalimidyl, chromonyl, naphtholactamyl, benzopyridonyl, ortho-sulphobenzimidyl, maleimidyl, naphtharidyinyl, benzimidazolonyl, benzoxazolonyl, benzothiazolonyl, benzothiazolinyl, quinazolonyl, pyrimidonyl, quinoxalonyl, phthalazonyl, dioxapyrimidinyl, pyridonlyl, isoquinolonyl, isoquinolinyl, benzoisoxazolyl, benzoisothiazolyl, indazolonyl, acridinyl, acridonyl, quniazolinedionyl, quinoxalinedionyl, benzoxazinedionyl, benzoxazinonyl, and naphththalimidyl;A represents N; X, Y independently represent O or NH; Z represents hydrogen, --CN, or unsubstituted or substituted aryl; W represents N--R⁵ ; R⁵ represents hydrogen, unsubstituted or substituted alkyl, unsubstituted or substituted cycloalkyl, or unsubstituted or substituted aryl; B represents an unsubstituted or substituted carbocyclic aromatic ring onto which one or more further rings can be fused. R¹ represents unsubstituted or substituted aryl, or unsubstituted or substituted hetaryl, hetaryl being selected from the group consisting of pyridyl, pyrimidyl, pyrazinyl, triazinyl, furanyl, pyrrolyl, thienyl, quinolyl, coumarinyl, benzofuranyl, benzimidazolyl, benzoxazolyl, dibenzofuranyl, benzothienyl, dibenzothienyl, indolyl, carbazolyl, pyrazolyl, imidazolyl, oxazolyl, isoxazolyl, thiazolyl, indazolyl, benzothiazolyl, pyridazinyl, cinnolyl, quinazolyl, quinoxalyl, phthalazinyl, phthalazinedionyl, phthalimidyl, chromonyl, naphtholactamyl, benzopyridonyl, ortho-sulphobenzimidyl, maleimidyl, naphtharidinyl, benzimidazolonyl, benzoxazolonyl, benzothiazolonyl, benzothiazolinyl, quinazolonyl, pyrimidonyl, quinoxalonyl, phthalazonyl, dixapyrimidinyl, pyridonyl, isoquinolonyl, isoquinolinyl, isothiazolyl, benzoisoxazolyl, benziothiazolyl, indazolonyl, acridinyl, acridonyl, quinazolinedionyl, quinoxalinedionyl, benzoxazinedionyl, benzoxazinonyl, and naphthalimidyl; R¹² represents --CN, --COOR⁷, --CONR⁵ R⁶ ; R⁶ represents hydrogen, unsubstituted or substituted alkyl, unsubstituted or substituted cycloalkyl, or unsubstituted or substituted aryl; R⁷ represents hydrogen, unsubstituted or substituted alkyl, unsubstituted or substituted cycloalkyl, unsubstituted or substituted aralkyl, or unsubstituted or substituted aryl; R¹³ represents halogen or --OR³ ; and R³ represents hydrogen, unsubstituted or substituted alkyl, unsubstituted or substituted cycloalkyl, or unsubstituted or substituted aryl.
 2. A compound according to claim 1, wherein B represents an unsubstituted or substituted carbocyclic aromatic ring.
 3. Compounds according to claim 1 in which X, Y are O, W is N--R⁵, Z is H, --CN, substituted or unsubstituted aryl, A is N, and B is a substituted aromatic ring.
 4. Compounds according to claim 1 in one of their tautomeric forms which correspond to the formula ##STR21## in which R¹⁴, R¹⁵ represent hydrogen, halogen, OR³, NR⁵ R⁶,R³ represents hydrogen or has the meanings mentioned for R⁵ and R⁶ has the meanings mentioned for R⁵.
 5. Compounds according to claim 1 in which R represents phenyl which can be substituted by 1 or 2 substituents from the series consisting of --SO₃ H, halogen, --CN, C₁ -C₄ -alkyl, --SO₂ NH₂.
 6. A method of dyeing synthetic fibres comprising dyeing the synthetic fibres with a heterocyclic compound of the formula (I) according to claim
 1. 7. A method of pigmenting pastes, paints, printing inks, colored paper and colored macromolecular substances comprising admixing therein a heterocyclic compound of the formula (I) according to claim
 1. 8. The method according to claim 7, wherein in the heterocyclic compound Z is not --CN, W is N--H and X, Y are O. 